package br.com.wepa.webapps.orca.controle.actions.login;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import br.com.wepa.webapps.logger.TraceLogger;
import br.com.wepa.webapps.orca.controle.actions.struts.SuperAction;

public class LogoutAction extends SuperAction {
	/**
	 * Objeto de Log
	 */
	private static final TraceLogger logger = new TraceLogger(
			LogoutAction.class);

	public LogoutAction() {
	}

	@Override
	protected ActionForward principal(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		logger.entering();

		request.getSession().invalidate();

		logger.exiting();
		return mapping.findForward(GLOBAL_FWPAGE_index);
	}

	@Override
	protected String getForwardErroName(String nomeMetodo) {
		// TODO Auto-generated method stub
		return null;
	}

}